package com.zyb;

import com.zyb.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import javax.sql.DataSource;

public class App {
    public static void main(String[] args) {
        ApplicationContext ctx = new
                ClassPathXmlApplicationContext("applicationContext.xml");
//        DataSource druidDataSource = (DataSource) ctx.getBean("druidDataSource");
//        System.out.println(druidDataSource);
//
//        DataSource comboPooledDataSource = (DataSource) ctx.getBean("comboPooledDataSource");
//        System.out.println(comboPooledDataSource);

        BookDao bookDao = (BookDao) ctx.getBean("bookDao");
        bookDao.save();
    }
}
